package com.gxa.dr2.controller;

import com.gxa.dr2.dto.ResultDTO;
import com.gxa.dr2.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("dept")
public class DeptController {



    @Autowired
    private DeptService deptService;


    /**
     * 所有的部门列表
     * @return
     */
    @PostMapping("list/all")
    @ResponseBody
    public ResultDTO listAll(){
        return deptService.allData();
    }




}
